﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Website/Views/Shared/Product.Master"
    Inherits="System.Web.Mvc.ViewPage<CustomerViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <% Html.RenderPartial("CustomerMenu"); %>
    <div class="lc">
        <div class="inner">
            <table>
                <tr style="background-color: #C6D9F0;">
                    <td class="width50">
                        &nbsp;
                    </td>
                    <td class="width40">
                        姓名
                    </td>
                    <td class="width50">
                        手机
                    </td>
                    <td class="width50">
                        电话
                    </td>
                    <td class="width200">
                        地址
                    </td>
                    <td class="width50">
                        邮编
                    </td>
                    <td>
                        备注
                    </td>
                </tr>
                <% foreach (UserAddressEntity item in Model.AddressBookList)
                   { %>
                <tr style="background-color: #E2F2FF;">
                    <td>
                        <input type="button" value="修改" name="btnModify" />
                        <input type="button" value="删除" name="btnDelete" />
                        <%= Html.Hidden("addressId" , item.AddressId , new { id = Guid.NewGuid() })%>
                    </td>
                    <td>
                        <%= item.ReallyName %>
                    </td>
                    <td>
                        <%= item.Mobile %>
                    </td>
                    <td>
                        <%= item.Phone %>
                    </td>
                    <td>
                        <%= item.Address %>
                    </td>
                    <td>
                        <%= item.PostNo %>
                    </td>
                    <td>
                        <%= item.Description %>
                    </td>
                </tr>
                <% } %>
            </table>
        </div>
        <div style="margin: 5px auto;">
            <input type="button" value="增加" id="btnAddressPostContent" /></div>
        <div id="AddressBookPost" class="AddressBookPost">
            <form method="post" action="">
            <%= Html.Partial("AddressBookPost") %>
            </form>
        </div>
    </div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cssLink" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="jsLink" runat="server">
    <script src="<%=Url.Content("~/Scripts/Website/AddressBook.js") %>" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="cssContent" runat="server">
    <style type="text/css">
        .lc
        {
            margin: 10px auto;
            background-color: #fff;
        }
        .lc div.inner
        {
            border: solid 1px #A2CBFF;
        }
        .lc div.inner table
        {
            border-collapse: collapse;
            width: 100%;
        }
        .lc div.inner table td
        {
            overflow: hidden;
            padding: 5px;
            vertical-align: middle;
            border: solid 1px #fFF;
            text-align: center;
            line-height: 1.5em;
        }
        .AddressBookPost
        {
            border: solid 1px #A2CBFF;
            display: none;
        }
        .AddressBookPost table
        {
            border-collapse: collapse;
            border-spacing: 1px;
            width: 100%;
        }
        .AddressBookPost table td
        {
            overflow: hidden;
            padding: 5px;
            vertical-align: middle;
            border: solid 1px #fFF;
        }
    </style>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="jsContent" runat="server">
    <script type="text/javascript">
        window.cr_deleteAddressItem_Url = '<%=Url.Action("DeleteAddressBookItem","Customer") %>';
    </script>
</asp:Content>
